package models

import (
	"github.com/goravel/framework/database/orm"
)

type ViolationLog struct {
	orm.Model
	ActionTime             string         `gorm:"column:action_time;type:varchar(255);not null" form:"action_time" json:"action_time"`
	UserId                 int            `gorm:"column:user_id;type:int;not null" form:"user_id" json:"user_id"`
	UserName               string         `gorm:"column:user_name;type:varchar(255);not null" form:"user_name" json:"user_name"`
	StreamId               string         `gorm:"column:stream_id;type:varchar(255);not null" form:"stream_id" json:"stream_id"`
	ViolationType          string         `gorm:"column:violation_type;type:varchar(255);not null" form:"violation_type"  json:"violation_type"`
	Container              string         `gorm:"column:container;type:varchar(255);null" form:"container"  json:"container"`
	Distance               string         `gorm:"column:distance;type:varchar(255);null" form:"distance"  json:"distance"`
	Item                   string         `gorm:"column:item;type:varchar(255);null" form:"item"  json:"item" comment:"物品"`
	Location               string         `gorm:"column:location;type:varchar(255);null" form:"location"  json:"location"`
	ActionTxt              string         `gorm:"column:action_txt;type:varchar(255);null" form:"action_txt"  json:"action_txt"`
	DescTxt                string         `gorm:"column:desc_txt;type:varchar(255);null" form:"desc_txt"  json:"desc_txt"`
	ServerLocation         string         `gorm:"column:server_location;type:varchar(255);null" form:"server_location"  json:"server_location"`
	Weapon                 string         `gorm:"column:weapon;type:varchar(255);null" form:"weapon"  json:"weapon"`
	CountTxt               string         `gorm:"column:count_txt;type:varchar(255);null" form:"count_txt"  json:"count_txt"`
	Attacker               string         `gorm:"column:attacker;type:varchar(255);null" form:"attacker"  json:"attacker"`
	AttackerLoc            string         `gorm:"column:attacker_loc;type:varchar(255);null" form:"attacker_loc"  json:"attacker_loc"`
	Victim                 string         `gorm:"column:victim;type:varchar(255);null" form:"victim"  json:"victim"`
	VictimLoc              string         `gorm:"column:victim_loc;type:varchar(255);null" form:"victim_loc"  json:"victim_loc"`
	VictimLocationDistance string         `gorm:"column:victim_location_distance;type:varchar(255);null" form:"victim_location_distance"  json:"victim_location_distance"`
	Reason                 string         `gorm:"column:reason;type:varchar(255);null" form:"reason"  json:"reason" comment:"踢人原因"`
	ItemsContainer         string         `gorm:"column:items_container;type:varchar(255);null" form:"items_container"  json:"items_container" comment:"容器"`
	Prisoner               string         `gorm:"column:prisoner;type:varchar(255);null" form:"prisoner"  json:"prisoner" comment:"囚犯"`
	TriggeredTrap          string         `gorm:"column:triggered_trap;type:varchar(255);null" form:"triggered_trap"  json:"triggered_trap" comment:"触发陷阱"`
	OriginalText           string         `gorm:"column:original_text;type:text;not null" form:"original_text"  json:"original_text"`
	ConfigurationID        int            `gorm:"column:configuration_id;type:int;null" form:"configuration_id" json:"configuration_id"`
	Configuration          *Configuration `gorm:"foreignkey:ConfigurationID" form:"-" json:"-"`
}

func (*ViolationLog) TableName() string {
	return "violationlogs"
}
